﻿using System;
using System.Collections.Generic;
using System.Web;

namespace SubstrateHelper.Services
{
    public class HttpHelper
    {
        
        public static System.Collections.Specialized.NameValueCollection GetParams(string uri)
        {
            try
            {
                int pos = uri.IndexOf('?');
                if (pos >= 0 && pos + 1 < uri.Length)
                {
                    string strParams = uri.Substring(pos + 1, uri.Length - pos - 1);

                    var values = HttpUtility.ParseQueryString(strParams);
                    return values;

                }
                return null;
            }
            catch
            {
                return null;
            }            
            
        }
        
    }
}
